home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1422 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: lamarck.sura.net!wvnvms!un025043
  2. From: un025043@wvnvms.wvnet.edu
  3. Newsgroups: comp.lang.c
  4. Subject: Arrows in Turbo C++ ...PLS HELP
  5. Message-ID: <1996Jan11.220047.16628@wvnvms>
  6. Date: 11 Jan 96 22:00:47 EST
  7. Organization: West Virginia Network for Educational Telecomputing
  8. Followup-To: comp.lang.c,comp.lang.c++
  9.  
  10. Hi,
  11.   I'm creating an Animated Graph Routine using Turbo C++ graphics.
  12. I have been able to show nodes as circles(colored) and links as
  13. lines, using the line() function.That suffices for undirected graphs.
  14.  
  15. In the case of directed graphs, I need to draw not plain lines but
  16. ARROWS. Unfortunately, Turbo C++ , or at least the graphics.h file
  17. does not have a pre-defined arrow() function.
  18.  
  19. Can any of you write an arrow() function that takes in four parameters,
  20. arrow(from_x,from_y,to_x,to_y) & draws an arrow directed from the
  21. point (from_x,from_y) to the point (to_x,to_y) ?
  22.  
  23. I've thought long & hard but the problem seems too difficult.You see,
  24. it is easy to write the function if one makes such major assunptions
  25. as a. Horizontal line, b.Vertical line.
  26. But for a line in ANY given direction, denoted by the set of 4 pixels
  27. as above, it becomes too difficult. Pls try your hand at this problem.
  28. I don't mind if you can't get an EXACT Arrow, any Arrow-like figure
  29. is acceptable.
  30.  
  31. Pls email me at krishna@h.cs.wvu.edu
  32.  
  33. Thank you.
  34.   Krish.
  35.  
  36.